﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="Cadastros_Sala" Codebehind="Sala.aspx.cs" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<%@ Register src="../Usercontrol/wuscSeguranca.ascx" tagname="wuscSeguranca" tagprefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"> 
<head id="Head1" runat="server"> 
    <title></title> 
    <script type="text/javascript">
        function RowDblClick(sender, eventArgs) {
            sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());

        } 
    </script> 
</head> 
<body> 
    <form id="form1" runat="server"> 
    <asp:ObjectDataSource ID="ods_Sala" runat="server"  
        DeleteMethod="_excluir_Sala" InsertMethod="_inserir_Sala"  
        SelectMethod="_obter_Sala" TypeName="Banco.BD_Sala"  
        UpdateMethod="_atualizar_Sala"> 
        <DeleteParameters> 
            <asp:Parameter Name="SALA_ID" Type="String" /> 
        </DeleteParameters> 
        <InsertParameters> 
            <asp:Parameter Name="SALA_ID" Type="String" /> 
            <asp:Parameter Name="SAL_DESCRICAO" Type="String" /> 
            <asp:Parameter Name="SAL_EXCLUIDO" Type="String" /> 
        </InsertParameters> 
        <SelectParameters> 
            <asp:Parameter Name="SALA_ID" Type="String" /> 
            <asp:Parameter Name="SAL_DESCRICAO" Type="String" /> 
            <asp:Parameter Name="SAL_EXCLUIDO" Type="String" /> 
        </SelectParameters> 
        <UpdateParameters> 
            <asp:Parameter Name="SALA_ID" Type="String" /> 
            <asp:Parameter Name="SAL_DESCRICAO" Type="String" /> 
            <asp:Parameter Name="SAL_EXCLUIDO" Type="Boolean" /> 
        </UpdateParameters> 
    </asp:ObjectDataSource> 
    
    <uc1:wuscSeguranca ID="wuscSeguranca1" runat="server" />
     
    <div> 
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> 
        </telerik:RadScriptManager> 
 
        <telerik:RadAjaxLoadingPanel ID="ralpGrid" runat="server" Skin="Default"> 
          </telerik:RadAjaxLoadingPanel> 
 
                 <telerik:RadAjaxPanel ID="rapGrid" runat="server" Height="480px" 
                    Width="100%" HorizontalAlign="NotSet" LoadingPanelID="ralpGrid" 
                    onajaxrequest="rapGrid_AjaxRequest"> 
 
        <telerik:RadGrid ID="rdg_Sala" runat="server" AutoGenerateColumns="False"  
                GridLines="None" Skin="Sunset" AllowSorting="True"  
                DataSourceID="ods_Sala" AllowAutomaticDeletes="True"  
                AllowAutomaticInserts="True" AllowAutomaticUpdates="True"  
                AllowFilteringByColumn="True" AllowPaging="True"  PageSize="15" Height="480px">  
                <ClientSettings> 
                    <Selecting AllowRowSelect="True" /> 
                    <ClientEvents OnRowDblClick="RowDblClick" /> 
                    <Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
                </ClientSettings> 
    <MasterTableView datasourceid="ods_Sala" commanditemdisplay="Top" EditMode="PopUp" ClientDataKeyNames="SALA_ID" DataKeyNames="SALA_ID" > 
    <RowIndicatorColumn> 
    <HeaderStyle Width="20px"></HeaderStyle> 
    </RowIndicatorColumn> 
 
    <ExpandCollapseColumn> 
    <HeaderStyle Width="20px"></HeaderStyle> 
    </ExpandCollapseColumn> 
        <CommandItemSettings AddNewRecordText="Adicionar Novo registro"  
            ExportToCsvText="Exportar para CSV" ExportToExcelText="Exportar para Excel"  
            ExportToPdfText="Exportar para PDF" ShowExportToExcelButton="True"  
            ShowExportToPdfButton="True" RefreshText="Atualizar" /> 
        <Columns> 
            <telerik:GridBoundColumn DataField="SALA_ID" HeaderText="Código" ReadOnly="true"
                UniqueName="SALA_ID"> 
                <HeaderStyle Width="120px" /> 
                <ItemStyle Font-Size="X-Small" Width="120px" /> 
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="SAL_DESCRICAO" HeaderText="Sala"  
                UniqueName="SAL_DESCRICAO"> 
                <HeaderStyle  /> 
                <ItemStyle Font-Size="X-Small" /> 
            </telerik:GridBoundColumn> 

            <telerik:GridCheckBoxColumn DataField="SAL_EXCLUIDO" HeaderText="Inativo" UniqueName="SAL_EXCLUIDO" 
                    AllowFiltering="false">
                <HeaderStyle HorizontalAlign="Center" Width="75px" /> 
                <ItemStyle HorizontalAlign="Center" Width="75px" /> 
            </telerik:GridCheckBoxColumn>


            <telerik:GridEditCommandColumn ButtonType="ImageButton" EditText=""  
                CancelText="" InsertText="" UpdateText="" EditImageUrl="../Imagens/grid_edit.png">             
                <HeaderStyle HorizontalAlign="Center" Width="40px" /> 
                <ItemStyle HorizontalAlign="Center" Width="40px" /> 
            </telerik:GridEditCommandColumn> 
            <telerik:GridButtonColumn ButtonType="ImageButton"  
                CommandName="Delete" ConfirmDialogType="RadWindow"  
                ConfirmText="Deseja realmente excluir este registro"  
                ImageUrl="../Imagens/grid_delete.png" UniqueName="DeleteColumn"  
                ConfirmTitle="Exclusão de registro" Text="Delete"> 
             
                <HeaderStyle HorizontalAlign="Center" Width="40px" /> 
                <ItemStyle HorizontalAlign="Center" Width="40px" /> 
            </telerik:GridButtonColumn> 
        </Columns> 
 
    <EditFormSettings> 
    <EditColumn UniqueName="EditCommandColumn1" ButtonType="ImageButton"></EditColumn> 
        <PopUpSettings Modal="True" /> 
    </EditFormSettings> 
    </MasterTableView> 
            </telerik:RadGrid> 
        </telerik:RadAjaxPanel>
         
     
    </div> 
    </form> 
</body> 
</html> 
